package Demo3;
/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 34255
 * Date: 2024-05-20
 * Time: 17:16
 */

//class OutClass{//外部类
//    public int data1 = 1;
//    private int data2 = 2;
//    private static final int data3 = 3;
//
//    static class InsideClass{
//        public int data4 = 4;
//        public int data5 = 5;
//        public static int data6 = 6;
//
//        public void test2(){
//            System.out.println("test2()...");
//            OutClass outClass = new OutClass();
//            System.out.println(outClass.data1);
//            System.out.println(outClass.data2);
//            System.out.println(data3);//静态内部类可以外部类中的静态成员
//            System.out.println(data4);
//            System.out.println(data5);
//            System.out.println(data6);
//            test1();
//        }
//    }
//
//    public static void test1(){
//        System.out.println("test1()...");
//    }
//}

public class Test {
    public static void main(String[] args) {
//        如何通过实例化一个静态内部类对象
//    InsideClass insideClass = new InsideClass();
//        OutClass.InsideClass insideClass = new OutClass.InsideClass();
//        insideClass.test2();
    }
}
